export const lastDays = (loaTime: string) => {
  // console.log(loaTime, '我是用来进行计算最后的值得')
  const targetDate: Date = new Date(loaTime);

  const now: Date = new Date();
  const differenceInMillis: number = now.getTime() - targetDate.getTime();
  const differenceInDays: number = Math.floor(
    differenceInMillis / (1000 * 60 * 60 * 24)
  );

  // console.log("日期差为：", differenceInDays, "天");
  return differenceInDays;
  // zvhz.push()
};
export const updTime = (differenceDate: any) => {
  const year: number = differenceDate.getUTCFullYear() - 1970; // 计算年份
  const month: number = differenceDate.getUTCMonth() + 1; // 计算月份
  const day: number = differenceDate.getUTCDate() - 1; // 计算日期

  const formattedDifference = `${year.toString().padStart(2, "0")}-${month
    .toString()
    .padStart(2, "0")}-${day.toString().padStart(2, "0")}`;
  console.log("时间差为：", formattedDifference);
};
